﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>告警管理</title>
<meta name="decorator" content="default" />
<tags:import includes="spinner,bootbox,form"></tags:import>
<script src="${ctxStatic}/modules/invoicing/stock.js"></script>
<script type="text/javascript">
	var _ctx = '${ctx}';
	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#frmSearch").submit();
		return false;
	}
</script>
</head>
<body>
	<br>
	<form id="frmSearch" modelAttribute="invoicing/stock"
		action="${ctx}/invoicing/stock/" method="post"
		class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
		<input id="pageSize" name="pageSize" type="hidden"
			value="${page.pageSize}" />
		<!--添加查询条件-->
		&nbsp;&nbsp;<label>库存单 ：</label><input type="text" name="stockFormId"
			htmlEscape="false" maxlength="11" class="input-medium" />
		&nbsp;&nbsp;<label>库存时间 ：</label><input type="text" name="stockTime"
			htmlEscape="false" maxlength="50" class="input-medium" />
		&nbsp;&nbsp;<label>操作员 ：</label><input type="text" name="operatman"
			htmlEscape="false" maxlength="11" class="input-medium" /> <br> <br>
		&nbsp;
		<button id="btnQuery" class="btn btn-success" " type="submit">查询</button>
		&nbsp;
		<button id="btnNew" class="btn" type="button">新增</button>
		&nbsp;
		<button id="btnDelete" class="btn" type="button">删除</button>
	</form>
	<br>
	<br>
	<tags:message content="${message}" />
	<table id="contentTable"
		class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th class="center" style="width: 50px;"><label> <input
						type="checkbox" class="ace" /> <span class="lbl"></span>
				</label></th>
				<th>库存单</th>
				<th>库存时间</th>
				<th>操作员</th>				
				<th>操作</th>				
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${pages.list}" var="stock">
				<tr>
					<td class="center"><label> <input value="${stock.id}"
							type="checkbox" class="ace" /> <span class="lbl"></span>
					</label></td>
					<td>${stock.stockFormId}</td>
					<td>${stock.stockTime}</td>
					<td>${stock.operatman}</td>
					<td><a href="javascript:onDelete('${stock.id}')">删除</a> <a
						href="javascript:onUpdate('${stock.id}')">编辑</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	${pages}
	<!-- 模态窗体 -->
	<div id="modalTable" action="new" class="modal fade"
		style="width:516px;height:468px;display:none;" tabindex="-1">
		<div class="modal-dialog">
			<div class="modal-content" style="width: 514px; height: 100%;">
				<div class="modal-header no-padding">
					<div class="table-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">
							<span class="white">&times;</span>
						</button>
						<span id='modalTitle'>新增窗体</span>
					</div>
				</div>
				<br>
				<!-- 新增窗体内部 -->
				<form id="frmSubmit" class="form-horizontal" role="form"
					method="post">
					<input type="hidden" name="userId" value="${userId}" uname="update" />
					<input type="hidden" name="id" uname="update" />
					<div class="form-group">
						<label class="col-sm-2 control-label no-padding-right">库存单
							: </label>
						<div class="col-sm-10">
							<input type="text"  style="width:397px;" class="col-xs-10" name="stockFormId"
								uname="update" />
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label no-padding-right">商品编号
							: </label>
						<div class="col-sm-10">
							<widgets:select width="130"
								datasource="${fns:getAllGoods()}"  
								dictName="goodsId" 
								dispVar="label" 
								dataPlaceholder="字典类型">
							</widgets:select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label no-padding-right">库存时间</label>
						<div class="col-sm-4">
							<input type="text" class="col-xs-10"
								name="stockTime" uname="update"/>
						</div>
						<label class="col-sm-2 control-label no-padding-right">操作员</label>
						<div class="col-sm-4">
							<widgets:select width="130"
								datasource="${fns:getAllDictType()}"  
								dictName="catalog" 
								dispVar="type" 
								dataPlaceholder="字典类型">
							</widgets:select>
						</div>
					</div>					
					
					<div class="form-group">
						<label class="col-sm-2 control-label no-padding-right">成本价</label>
						<div class="col-sm-4">
							<input type="text" class="col-xs-10"
								name="costPrice" uname="update"/>
						</div>
						<label class="col-sm-2 control-label no-padding-right">销售价</label>
						<div class="col-sm-4">
							<input type="text" class="col-xs-10"
								name="salePrice" uname="update"/>
						</div>
					</div>	
					
					<div class="form-group">
						<label class="col-sm-2 control-label no-padding-right">货物状态</label>
						<div class="col-sm-4">
							<widgets:select width="130"
								datasource="${fns:getDictList('goods_state')}"  
								dictName="goodsState" 
								dispVar="label" 
								dataPlaceholder="字典类型">
							</widgets:select>
						</div>
						<label class="col-sm-2 control-label no-padding-right">库存数量</label>
						<div class="col-sm-4">
							<input type="text" class="col-xs-10"
								name="stockQuantity" uname="update"/>
						</div>
					</div>	
					
					<div class="form-group">
						<label class="col-sm-2 control-label no-padding-right">最低储备</label>
						<div class="col-sm-4">
							<input type="text" class="col-xs-10"
								name="minReserves" uname="update"/>
						</div>
						<label class="col-sm-2 control-label no-padding-right">正常储备</label>
						<div class="col-sm-4">
							<input type="text" class="col-xs-10"
								name="norReserves" uname="update"/>
						</div>
					</div>	
					
					<div class="form-group">				
						<label class="col-sm-2 control-label no-padding-right">最大储备</label>
						<div class="col-sm-4">
							<input type="text" class="col-xs-10"
								name="maxReserves" uname="update"/>
						</div>
					</div>	
					<div class="space-4"></div>
					<div class="clearfix form-actions">
						<div class="center">
							<button id="btnSubmit" class="btn btn-info" type="button">
								<i class="icon-ok bigger-110"></i> 保存
							</button>
							&nbsp; &nbsp; &nbsp;
							<button class="btn" type="reset">
								<i class="icon-undo bigger-110"></i> 重置
							</button>
						</div>
					</div>
				</form>
				<!-- PAGE CONTENT ENDS -->
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal-dialog -->
	</div>
</body>
</html>
